import axios from '@/utils/request';

/**
 * 获取客户应付账款页列表
 */
export async function QueryPaycustomeraccountByCondition(params) {
    const res = await axios.post('/Paycustomeraccount/QueryPaycustomeraccountByCondition',params);
    if (res.data.code === 200) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.msg));
}

/**
 * 获取客户付款明细分页列表
 */
 export async function QueryPaycustomeraccountitemByCondition(params) {
    const res = await axios.post('/Paycustomeraccountitem/QueryPaycustomeraccountitemByCondition',params);
    if (res.data.code === 200) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.msg));
}


/**
 * 作废客户付款明细
 */
 export async function DeletePaycustomeraccountitem(id) {
    const res = await axios.post('/Paycustomeraccountitem/DeletePaycustomeraccountitem?id='+id);
    if (res.data.code === 200) {
        return res.data.msg;
    }
    return Promise.reject(new Error(res.data.msg));
}

